The present invention relates to a data recorder, and more particularly, to a data recorder having a buffer memory for storing data provided from an external device and recording the stored data of the buffer memory on a recording medium.
An optical disc recorder records data on an optical disc, which serves as a recording medium. A CD-DA family compact disc-recordable (CD-R) drive is one type of optical disc recorder that is widely used. A CD-R is a so-called write-once optical disc on which data is written only once. The recorded data cannot be physically deleted. A laser beam is irradiated against the optical disc from an optical head of the CD-R drive. The heat of the laser beam melts a dye and forms recording pits on a recording layer of the optical disc. Data is recorded on the disc by changing the reflecting rate of the recording layer.
The optical disc recorder includes a buffer memory and an encoder. The buffer memory temporarily stores data provided from an external device, such as a personal computer. The encoder reads the data from the buffer memory and encodes the read data to record the data on the optical disc.
In such an optical disc recorder, if, for example, the rate of data transmission from the external device is slower than the recording data transmission rate of the optical disc (write speed), the transmission rate of the recording data output from the encoder is faster than the transmission rate of the data provided to the buffer. This decreases the amount of data stored in the buffer memory. If the decrease continues, the data amount ultimately becomes null and the buffer memory becomes empty. This stops the stream of data to the encoder and causes an interruption in the data recorded on the optical disc. This problem is referred to as buffer underrun. The interruption in the data recorded on the optical disc resulting from buffer underrun is referred to as a buffer underrun error.
Data is recorded on an optical disc using a recording technique that designates the file group recorded on the optical disc (e.g., disc at once, track at once). Thus, if a buffer underrun error occurs, the entire optical disc becomes unusable when employing disc at once, and the track undergoing recording becomes unusable when employing track at once.
Recent CD-R drives record data at a speed four times or eight times the normal recording speed. Further, recent personal computers have multitasking functions to operate CD-R drives. This has increased the tendency of the occurrence of buffer underrun errors.
Packet writing is one type of data recording that records data in packet units. Packet writing records data on an optical disc when the data reaches the capacity of the packet. This prevents the occurrence of buffer underrun errors. However, link blocks must be formed to connect packets in packet writing. The link blocks decrease the recording capacity of the optical disc. Further, there are CD-ROM drives that are not capable of handling packet writing. Such CD-ROM drives cannot reproduce data written to optical discs through packet writing. In other words, the CD-ROM compatibility required by the CD-R standard (Orange Book Part II) does not include packet writing. For example, packet writing cannot be applied for a CD-DA player. Thus, a CD-R drive cannot record CD-DA audio data through packet writing. Accordingly, there is a need for preventing buffer underrun errors without employing packet writing.
A CD-rewritable (CD-RW) drive is another type of optical disc recorder that is widely used. A CD-RW drive irradiates a laser beam from an optical head against an optical disc. The heat of the laser beam causes phase changes between amorphic and crystalline to form recording pits on the recording layer of the optical disc. This changes the reflecting rate of the recording layer and records data on the optical disc. Data can be repeatedly rewritten to optical discs used by the CD-RW drive. Accordingly, the optical disc remains usable even if a buffer underrun error occurs. However, when a buffer underrun error occurs, the data file that was being recorded before the occurrence of the buffer underrun error must be recorded again. This wastes the recording performed prior to the occurrence of the buffer underrun error and increases the recording time.
A magneto-optic disc recorder is another type of known data recorder. The magneto-optic disc recorder irradiates a laser beam from an optical head against a magneto-optic disc. This applies residual magnetization to the recording layer of the optical disc and records data on the magnetooptic disc. Mini disc (MD) drives are widely used magnetooptic disc recorders. However, MD drives have the same problem as CD-RW drives.
It is an object of the present invention to provide a data recorder that records data in a manner that the continuity of the data is ensured even if the recording of data to a recording medium is interrupted.
To achieve the above object, the present invention provides a data recorder for writing data to a recording medium. The data recorder includes a buffer memory for temporarily storing data before the data is written to the recording medium, and an address memory connected to the buffer memory. The address memory stores at least one of an address of the recording medium and an address of the buffer memory when the writing of data to the recording medium is interrupted. Each address indicates a location of the data when the interruption occurred. A synchronizing circuit sequentially reads the data written to the recording medium prior to the writing interruption and the data stored in the buffer memory prior to the writing interruption and synchronizes the written data and the stored data. A restart circuit restarts data writing to the recording medium when at least one of an address of the data read from the recording medium and an address of the data read from the buffer memory matches the address stored in the address memory. The restart circuit suspends the restarting and the synchronizing circuit repeats the reading and synchronizing of data when the address of the data read from the recording medium or the address of the data read from the buffer memory matches the address stored in the address memory before the synchronizing circuit completes the data synchronization.
A further aspect of the present invention provides a data recorder for recording data on a recording medium. The data recorder includes a buffer memory for temporarily storing data before the data is recorded on the recording medium. An interrupt circuit interrupts the recording of data when a first state, in which there is a possibility that the continuity of data may be lost, is detected during the recording of data on the recording medium. An address memory is connected to the buffer memory. The address memory stores a first address and a second address when the recording of data to the recording medium is interrupted. The first address indicates a location of the data on the recording medium of the data when the interruption occurred. The second address indicates a location of the data in the buffer memory when the interruption occurred. A synchronizing circuit reads the data written to the recording medium from an address preceding the first address and the data stored in the buffer memory from an address preceding the second address and synchronizes the recorded data and the stored buffer data during interruption of the recording when a second state, in which a loss of data continuity is unlikely to occur, is detected. A restart circuit restarts the recording of data on the recording medium from the data of one of the first address and the second address when the synchronizing circuit completes the data synchronization. A retry determination circuit retries the data synchronization with the synchronizing circuit when the data synchronization is not completed until the address of the data read by the synchronizing circuit matches one of the first and second addresses.
Another aspect of the present invention provides a data recorder for recording data on a recording medium. The data recorder includes a buffer memory for temporarily storing data and an encoder connected to the buffer memory. The encoder receives data read from the buffer memory and encodes the read data to generate recording data. A recording unit is connected to the encoder to record the recording data on the recording medium. A reproduction unit reproduces the recording data on the recording medium to generate reproduced data. An address generation circuit is connected to the reproduction unit. The address generation circuit uses the reproduced data to generate a reproduction recording address indicating a location in the recording medium of the recording data. A recording address memory is connected to the address generation circuit to store an interruption recording address in response to a recording interrupt signal. A first location detection circuit is connected to the address generation circuit memory and the recording address memory. The first location detection circuit compares the reproduction recording address and the interruption recording address to generate a first match detection signal when the reproduction recording address matches the interruption recording address. A buffer address memory is connected to the buffer memory to store an interruption buffer address of the data read from the buffer in response to the recording interrupt signal. A second location detection circuit is connected to the buffer memory and the buffer address memory. The second location detection circuit compares a read buffer address of the data read from the buffer memory with the interruption buffer address to generate a second match detection signal when the read buffer address matches the interruption buffer address. An interrupt circuit is connected to the encoder, the recording address memory, and the buffer address memory. The interrupt circuit provides the recording address memory and the buffer address memory with the recording interrupt signal to stop the operation of the encoder when a first state, in which there is a possibility that the continuity of data may be lost, is detected during the recording of data on the recording medium. A synchronizing circuit is connected to the reproduction unit and the recording unit. The synchronizing circuit reads the data recorded on the recording medium from an address preceding the interruption recording address and the data stored in the buffer memory from an address preceding the interruption buffer address and synchronizes the reproduced data and the recording data. A retry determination circuit is connected to the first and second location detection circuits to perform the data synchronization with the synchronizing circuit until the first and second match detection signals are simultaneously generated. The retry determination circuit determines to crestart the recording when the first and second match detection signals are simultaneously generated.
A further aspect of the present invention provides a method for recording data on a recording medium. The method includes generating first encoded data by encoding data, recording the first encoded data on the recording medium, generating reproduced data by reproducing the data recorded on the recording medium when the recording of data is interrupted, generating second encoded data by encoding data that corresponds to the data recorded on the recording medium, synchronizing the reproduced data and the second encoded data, restarting the recording of data when the reproduced data and the second encoded data are synchronized before the reproduction of the data recorded on the recording medium is completed, and repeating the reproduced data generation, the second encoded data generation, and the synchronizing when the synchronization is not completed before the reproduction of the data recorded on the recording medium is completed.